import React from 'react'
import {HashRouter,Route,Switch} from 'react-router-dom'
import App from './App'
import Login from './pages/login/index'
import Admin from './admin'
import Buttons from './pages/ui/buttons'
import Modals from './pages/ui/modals'
import NoMatch from './pages/nomatch/index'
export default class IRouter extends React.Component {

  render() {
    return (
      <div>
          <HashRouter>
              <App>
                  <Route path="/login" component={Login}/>
                  <Route path="/" render={()=>
                    <Admin>
                      <Switch>
                        <Route path="/ui/buttons" component={Buttons}/>
                        <Route path="/ui/modals" component={Modals}/>
                        <Route  component={NoMatch}/>
                      </Switch>
                    </Admin>
                  }/>
              </App>
          </HashRouter>
      </div>
    );
  }
}

